package org.bluedream.core.module.entity.bill.ord;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.bluedream.comm.base.bill.BillHeadEntity;
import org.bluedream.core.module.entity.goods.Supplier;
import org.bluedream.core.module.entity.warehouse.WareHouse;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * @ClassName Ord       采购订货单
 * @Description TODO
 * @Author foxsand
 * @Data 2021-11-18 13:59
 * @Version
 */
@Data
@ToString(callSuper = true)
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@TableName(value = "ord")
public class Ord extends BillHeadEntity<Ord> {
    private static final long serialVersionUID = -4454943656809277847L;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date fildate;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date deadDate;
    private String warCode;
    @TableField(exist = false)
    private String warName;
    private String supplierCode;
    @TableField(exist = false)
    private String supplierName;

    @TableField(exist = false)
    private WareHouse wareHouse;

    @TableField(exist = false)
    private Supplier supplier;

    @TableField(exist = false)
    private List<OrdDtl> ordDtlList;

    public Ord(String id) {
        super(id);
    }

    public Ord(long limit , long pageSize) {
        super(limit , pageSize);
    }
}
